package com.lagou.demo.service;

import com.lagou.demo.dao.ClassesDao;
import com.lagou.demo.factory.DaoFactory;
import com.lagou.demo.pojo.Classes;
import com.lagou.demo.pojo.Page;

import java.util.List;
/**
 * 定义ClassesService调用ClassesDao的实现类实现增删改查方法
 */
public class ClassesService {
    private ClassesDao classesDao;

    public ClassesService() {
        this.classesDao = DaoFactory.getClassDao();
    }

    public int ClassAdd(Classes classes) {
        return classesDao.classAdd(classes);
    }

    public int ClassDelete(String[] id) {
        return classesDao.classDelete(id);
    }

    public int classUpdate(Classes classes) {
        return classesDao.classUpdate(classes);
    }

    public Classes classesFind(int id) {
        return classesDao.classesFind(id);
    }

    public List<Classes> classesSearch(Page page) {
        return classesDao.classesSearch(page);
    }
}
